import random
import time

def generate_random_number():
    return random.randint(0, 255)

try:
    while True:
        random_number = generate_random_number()
        print(random_number, flush=True)
        time.sleep(0.01)
except Exception as e:
    print(f"Error: {e}", flush=True)
    exit(2)
